﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Animation;

namespace Pintor
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private bool opened = false;


        public MainWindow()
        {
            InitializeComponent();
        }

        private void lineArrow_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            OpenClose();
        }

        private void gridImage_MouseMove(object sender, MouseEventArgs e)
        {
            if (imageDraw.Source == null) { gridImage.Cursor = Cursors.No; }
            else gridImage.Cursor = Cursors.Pen;
        }


        #region Controle Animacoes
        private void OpenClose()
        {
            if (!opened)
            {
                Storyboard openToolPanel = (Storyboard)FindResource("OpenToolPanel");
                openToolPanel.Begin();
                opened = true;
            }
            else
            {
                Storyboard openToolPanel = (Storyboard)FindResource("CloseToolPanel");
                openToolPanel.Begin();
                opened = false;
            }
        }
        #endregion

        private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
           
        }
    }
}
